Online trading is perfectly safe and legal to do – as long as you're using a regulated online broker and play by the “rules.” As a general rule, you should never invest more than what you're willing to lose.