Should be completely legal. They want your ID for records. You'll still have to pay tax and report it to the IRS or whatever equivelant for your country, but otherwise this is completely legal.
If you can money, you can report capital gain; should you lost money on it, I am wondering if report capital loss, will IRS audit you, maybe just they are curious...