Did you only have the "titjob"? If that's the case, you had no risk.
In order to get STDs there needs to be a sexual intercourse, such as oral, vaginal or anal penetrations. Rubbing and touching does not spread any STDs. Only if there were any chancre (syphilis) or blisters (herpes) on the skin, those infections could be transmitted through contact skin to skin.