Messenger of Allah ﷺ said, "Don't sell gold for gold unless equal in weight, nor silver for silver unless equal in weight, but you could sell gold for silver or silver for gold as you like."
قَالَ رَسُولُ اللَّهِ ﷺ لاَ تَبِيعُوا الذَّهَبَ بِالذَّهَبِ إِلاَّ سَوَاءً بِسَوَاءٍ وَالْفِضَّةَ بِالْفِضَّةِ إِلاَّ سَوَاءً بِسَوَاءٍ وَبِيعُوا الذَّهَبَ بِالْفِضَّةِ وَالْفِضَّةَ بِالذَّهَبِ كَيْفَ شِئْتُمْ