Mishkat al-Masabih
‘Ubada b. as-Samit reported God's Messenger as saying, "Gold is to be paid for by gold, silver by silver, wheat by wheat, barley by barley, dates by dates, and salt by salt, like for like and equal for equal, payment being made on the spot. If these classes differ, sell as you wish if payment is made on the spot.” Muslim transmitted it.
وَعَنْ عُبَادَةَ بْنِ الصَّامِتِ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «الذَّهَبُ بِالذَّهَبِ وَالْفِضَّةُ بِالْفِضَّةِ وَالْبُرُّ بِالْبُرِّ وَالشَّعِيرُ بِالشَّعِيرِ وَالتَّمْرُ بِالتَّمْرِ وَالْملح بالملح مثلا بِمثل سَوَاء بسَواءٍ يَدًا بِيَدٍ فَإِذَا اخْتَلَفَتْ هَذِهِ الْأَصْنَافُ فَبِيعُوا كَيْفَ شِئْتُمْ إِذَا كَانَ يَدًا بِيَدٍ» . رَوَاهُ مُسلم
Reference