Hadith 5014
Sayyiduna Abu Bakrah (may Allah be pleased with him) narrates: The Prophet (peace and blessings of Allah be upon him) forbade selling silver for silver or gold for gold, except if it is equal (in amount, then it is permissible), and the Prophet (peace and blessings of Allah be upon him) commanded that gold may be sold for silver as one wishes, or silver for gold as one wishes.
(Imam Ibn Hibban, may Allah have mercy on him, says:) The statement of the Prophet (peace and blessings of Allah be upon him): "as one wishes" means: when the transaction is hand to hand.