This was done in 2012: https://en.wikipedia.org/wiki/STOCK_Act
The STOCK Act mostly only had the effect of creating some inconveniences for lawmakers (e.g., their families could still trade based on their guidance), and even that was only the case for a year as Senator Reid's House bill S.716 effectively gutted the STOCK Act and restored the status quo, was passed by unanimous consent after 14 seconds of discussion, and was signed into law by President Obama: https://en.wikipedia.org/wiki/STOCK_Act#Amendment
https://www.congress.gov/bill/113th-congress/senate-bill/716
> A member, officer, or employee of the __Senate__ shall not receive any compensation, nor shall he permit any compensation to accrue to his beneficial interest from any source, the receipt or accrual of which would occur by virtue of influence improperly exerted from his position as a member, officer, or employee.
Emphasis mine. This does not cover the judicial or executive branch