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.
Hadith Reference صحیح ابن حبان / كتاب البيوع / 5014
Hadith Grading فضيلة الشيخ الإمام محمد ناصر الدين الألباني صحيح - «أحاديث البيوع»: ق. فضيلة الشيخ العلّامة شُعيب الأرناؤوط إسناده صحيح على شرط البخاري
Hadith Takhrij «رقم طبعة با وزير 4993»