Sunan an-Nasa'i, Book 44, Hadith 130 (In-Book)

'Abdur-Rahman bin Abi Bakrah narrated that his father said: "The Messenger of Allah forbade selling silver for silver and gold for gold, unless it was of equal amounts. And he told us to sell gold for silver however we wanted, and silver for gold however we wanted.

وَفِيمَا قَرَأَ عَلَيْنَا أَحْمَدُ بْنُ مَنِيعٍ قَالَ حَدَّثَنَا عَبَّادُ بْنُ الْعَوَّامِ، قَالَ حَدَّثَنَا يَحْيَى بْنُ أَبِي إِسْحَاقَ، قَالَ حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ أَبِي بَكْرَةَ، عَنْ أَبِيهِ، قَالَ نَهَى رَسُولُ اللَّهِ صلى الله عليه وسلم عَنْ بَيْعِ الْفِضَّةِ بِالْفِضَّةِ وَالذَّهَبِ بِالذَّهَبِ إِلاَّ سَوَاءً بِسَوَاءٍ وَأَمَرَنَا أَنْ نَبْتَاعَ الذَّهَبَ بِالْفِضَّةِ كَيْفَ شِئْنَا وَالْفِضَّةَ بِالذَّهَبِ كَيْفَ شِئْنَا ‏.‏

sunnah.com