CHICAGO (AP) _ A federal grand jury Wednesday indicted 46 traders on charges ranging from tax fraud to racketeering for allegedly bilking profits from hundreds of customers at the world's two largest commodity exchanges.

After a 2 1/2 year undercover FBI probe, traders at the Chicago Board of Trade and Chicago Mercantile Exchange were accused of systematically conspiring to skim profits from customer accounts and attempting to hide earnings from the Internal Revenue Service.

Sixteen of the traders were charged with violating the federal Racketeer Influenced and Corrupt Organizations act, which empowers the government to freeze defendants' assets before a trial for seizure upon conviction.

The government increasingly has been using the law - enacted to fight organized crime such as drug trafficking - to crack down on securities crime and other white-collar corruption.

''The activity uncovered at these exchanges - the largest of their type in the world - cannot be tolerated,'' U.S. Attorney General Dick Thornburgh said at a news conference announcing the charges.

U.S. Attorney Anton Valukas said traders broke the law as well as the rules governing business at the exchanges by arranging deals with one another before and after the pits were open for trading.

He said the alleged activity involved hundreds of customers and thousands of trades. No dollar amount was given for the alleged fraud but Valukas said ''it is in our opinion significant.''

Officials said the investigation was continuing and indicated more indictments were possible.

The alleged illegal activities apparently occurred in the Swiss franc and Japanese yen currency pits at the Chicago Merc and the U.S. Treasury bond and soybean pits at the Board of Trade.

Nineteen people were charged for activities in the soybean pits, 21 in the Japanese yen pits and three each in the Treasury bond and Swiss franc pits.

The government said the Board of Trade and the Merc were not involved in any of the illegal activity and had cooperated in the investigation.

The charges, contained in four indictments totaling 375 pages, included hundreds of counts against the 46 people named.

''The legitimate activities of these exchanges, involving everything from grains to government bonds and foreign currencies, impact upon farmers, consumers, businesses and governments,'' Thornburgh said.

''I want to assure all parties that public confidence in the honest functioning of the marketplace will be vigorously protected,'' he added.

Thornburgh was joined by Valukas, FBI Director William Sessions and Wendy Gramm, head of the Commodity Futures Trading Commission, in unveiling the indictments.

The indictments cite trades dating to March 1984 and paint a picture of several dozen traders who routinely engaged in illegal schemes to enhance their own profits at the expense of customers.

Valukas said the alleged schemes involved pre-arranged trades at prices below what customers actually paid for a commodity, with both the buying and selling trader sharing in illegal profits.

Traders also are alleged to have frequently changed prices on their cards after the close of business to increase the traders' profits and correct bad deals.

Valukas cited specific instances during the summer of 1988 - when soybean prices rose rapidly because of a drought - where brokers allegedly withheld orders from the market routinely and then doled them out to favored traders, cheating customers out of a fair market price.

''The indictments which are returned today charged in each and every instance the participation by brokers and traders in illegal schemes, which defrauded customers,'' Valukas said.

''What we are talking about here are hundreds of customers involving thousands of trades for which fraud was perpetrated and losses incurred by those customers because of this scheme,'' he said.

The FBI investigation, disclosed in January, centered on allegations that trades were rigged to prevent customers from getting fair market prices and that brokers sent false reports to customers to hide the skimming of profits or overcharges on commissions.

The Mercantile Exchange also reportedly has brought its own charges against four traders in connection with yen-pit trades with an undercover FBI agent who was part of the federal probe.

Traders reportedly have been bargaining with authorities and the exchanges to reduce the possible penalties against them.

FBI agents gathered evidence while posing as traders in the soybean and Treasury bond futures pits at the Board of Trade and the yen and Swiss franc futures pits at the Chicago Merc.

Futures are contracts to buy or sell, by a future date at a specified price, commodities and financial instruments ranging from soybeans and pork bellies to Treasury bonds and baskets of stocks.

Futures traders can make and lose fortunes within minutes while standing shoulder-to-shoulder in the pits and trading with each other.

Independent traders called ''locals'' trade for their own accounts. Other traders, called brokers, trade on behalf of clients of futures brokerages. Some brokers also trade for their own accounts in an often-criticize d practice called dual trading.

The government won a key battle clearing the way for the indictments on Friday when Chief U.S. District Judge John Grady denied a Swiss franc trader's contention that the government's secret taping of traders on the exchange floors had violated federal electronic surveillance laws.

Separately, the CFTC announced it had temporarily revoked the trading privileges and floor broker registrations of several traders named in the indictments.

The commission filed administrative complaints alleging the traders violated federal anti-fraud and trading provisions of federal commodities law, plus prohibitions against non-competitive trading. Those named settled the complaints without admitting or denying guilt.

The CFTC said it revoked the floor broker registrations of David Skrodzki, Harry Patten and John Eggum, who traded at the Board of Trade; of Brian Sledz, Mark Furhman and Thomas Braniff, who traded at the Merc;

Terminated for three years were the trading privileges of those seven plus James Siedz.

The commission also suspended the floor broker registration and trading privileges of Board of Trade trader Kenneth Gillen for six months.