President Obama signed legislation Wednesday barring members of Congress, the president and thousands of federal workers from profiting from nonpublic information learned on the job, calling it an embodiment of the fundamental American value of fair play.

Obama said the move to bar insider trading among lawmakers would assure everyone "plays by the same rules."

"It's the notion that the powerful shouldn't get to create one set of rules for themselves and another set of rules for everybody else," Obama said.

"If we expect that to apply to our biggest corporations and our most successful citizens, it certainly should apply to our elected officials," Obama said.

The new law lets the public see more of government officials' financial dealings yet some members of Congress said it fell short. Lawmakers abandoned an earlier proposal to require public reports from people who gather information from Congress and sell it, mostly to investors.

Obama was joined by several lawmakers who pushed the bill through Congress, including Massachusetts Sen. Scott Brown, a Republican who has been targeted by Democrats and is expected to face a stiff challenge from Elizabeth Warren, a Harvard professor who helped launch the new federal Consumer Financial Protection Bureau.

The driving force behind the bill was Congress' attempt to boost dismal approval ratings, with polls showing between 12 percent and 19 percent of Americans approve of the job Congress is doing.

Called the STOCK Act, which stands for Stop Trading on Congressional Knowledge, the new law requires that public reports of new transactions exceeding $1,000 be posted online either 30 days after the individual was notified of a transaction in his or her account, or 45 days after the transaction.

The House currently posts disclosure information on the Internet, but the Senate still requires people seeking the data to appear personally in a Senate office building.

Federal insider trading laws have no exemption for members of Congress and other federal officials. There has been little evidence that many lawmakers have been investigated.

The Office of Congressional Ethics has looked at the trading activities of Rep. Spencer Bachus, R-Ala. In the two months surrounding the 2008 financial collapse and subsequent $700 billion economic bailout passed by Congress, Bachus made more than three dozen trades. The OCE is an independent ethics office of the House, run by a board outside Congress.

Bachus, now chairman of the House Financial Services Committee, has denied using inside information and any wrongdoing.