Can I collect a fee from the seller and the buyer in the same transaction?

Yes, but the Real Estate License Act states that, as a licensee, you may only receive compensation from more than one party if you have the full knowledge and consent of all parties. It's also a good idea for you to get the necessary consents in writing.

In addition to the legal requirement, Article 7 of the REALTOR® Code of Ethics states that "in a transaction, REALTORS® shall not accept compensation from more than one party, even if permitted by law, without disclosure to all parties and the informed consent of the REALTOR®'s client or clients." However, the legal requirement puts a greater obligation on you than the REALTOR® Code of Ethics because it requires the consent of all parties and not just the consent of the REALTOR®'s client.