On the Spanish layout, ~ is practically nonexistent. You can do it with AltGr+4 but it's not even visually shown in many keyboards (e.g. in mine). I know how to type it because I'm a programmer, but 99% of Spanish laypeople probably don't know that symbol can even be typed. So that wouldn't be a good choice.