Keep It Under Your Hat

What does the idiom “keep it under your hat” mean?

Definition: Don’t tell anyone; don’t reveal this secret

Example: I have a really hot stock tip for you. I can tell you now, but keep it under your hat.