# Purse
In NetHack, your purse or wallet is the implied, non-selectable item that acts as the inventory slot for the gold pieces you are carrying, and is what NetHack will refer to for any interactions involving money on your person. The amount of gold in your purse/wallet appears on the status line.
The game uses both terms somewhat interchangeably, and as such the article will use the appropriate term based on the context and related messages. Any gold stashed in a bag or other container is not considered part of your purse or wallet, and thus not included in the count for relevant events; this article only refers to the open inventory unless otherwise specified.

Contents

1 Player actions
2 Relevant items
3 Gold and dungeon features
4 Relevant monster actions
5 Strategy
6 History
7 Messages
8 Variants

8.1 UnNetHack

Player actions
You can display the amount of gold you have in your wallet at any time by pressing $. In a shop, this will also display any credit or debt you have.

Relevant items
One of the failure effects of reading a spellbook, but failing to learn the spell, is causing all the gold in your wallet to disappear; the gold cannot be recovered.

Gold and dungeon features
Dipping an item in a fountain may occasionally cause you to lose up to 10% of your current gold. If this occurs in a fountain you have already found gems or gold in, you will be able to find gems and gold in it again; remember that the fountain has a chance of drying up and disappearing with each dip.
Sitting on a throne may cause all the gold you have to vanish, similar to failure effects from reading a spellbook. Looting a throne while confused and carrying gold may generate a throne room monster; this deposits a random amount of your gold (up to all of it) into its inventory. However, if there is a chest on the level, the gold will be relocated to that chest instead of generating a monster.

Relevant monster actions
Leprechauns will approach you or run from you depending on if you have any gold in open inventory, among other factors: if your wallet is empty, they will try to evade you most of the time, while if you have gold in your purse, they will approach and try to attack - if a leprechaun successfully hits you while you are carrying gold, they will steal it, attempt to teleport away and flee from you temporarily. The stolen gold will be added to the gold they were created with upon generation, and can be retrieved by killing them. Players can do the same to other monsters by polymorphing into a leprechaun.
If a vault guard enters the vault and asks for your name, and your answer is not one of Croesus, Kroisos or Creosote (unless you have already killed him), you will be asked to drop all of the gold you are carrying—this includes gold you also have stashed in carried containers, as opposed to just in your wallet. The guard will lead you out once you have done so, and will become hostile and attack if you take too long.

The following information pertains to an upcoming version (3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.

As of commit 2591a21, leprechauns that steal your gold have a chance to bury it in the ground after teleporting if their destination is in a non-shop room out of your sight.
Strategy
When you are in certain situations where you might lose your gold, you can protect it by removing it from your purse. If you have a bag on hand, you can stash your gold inside; you can also stash your gold into a chest or large box nearby. If all else fails, you can drop or throw it on the floor; note that leprechauns can still snatch gold from underneath your feet, if you are standing directly on it.
Since demon lords and princes seeking bribes only care about gold visible in your purse and will ask for an amount less than or equal to it, it may be worth carrying around a handful of gold pieces in open inventory beforehand if you would prefer to pay particular demon lords off.

History
The purse function has been present as early as NetHack 1.3d; in that version, using the command would cause you to physically stop and count your coins, an action that takes several turns and leaves you vulnerable to monsters in the meantime.

Messages
Your wallet contains 

<x> zorkmid(s).
You used $ to check the gold you have on hand.
Your wallet is empty.
As above, but you have no gold.
You notice you have no <gold money="">!
You failed to learn a spell from reading a spellbook, or else sat on a throne, and the gold in your open inventory vanished. NetHack 3.6.0 uses "money", where all other versions use gold.
You feel a strange sensation.
As above, but you had no gold.
An urge to take a bath overwhelms you!You lost some of your gold in the fountain!
You dipped an object into a fountain and lost some of your gold; the second line does not occur if you had no gold in open inventory.
The exchequer accepts your contribution.
You looted a throne while confused and carrying gold, generating a throne room monster and placing some or all of your gold in its inventory.
Thank you for your contribution to reduce the debt.
You looted a throne while confused and carrying gold, but a chest was on the level; the gold is placed in there instead of generating a monster.
Your purse feels lighter.
A leprechaun hit you and stole gold from your open inventory.
Your purse feels heavier.
You stole some gold from a monster while polymorphed into a leprechaun.
Variants
In many variants that use object materials, leprechauns will also attempt to steal any items made of gold in your open inventory rather than just your money.

UnNetHack
In UnNetHack, using $ to check your gold also tells you how much gold you have stashed away in containers within your inventory.

</gold></x>