The Messenger of Allah ﷺ forbade us from selling gold for gold, silver for silver, wheat for wheat, barley for barley, and dates for dates. One of the two narrators added, "and salt for salt," while the other did not mention it. He said the exchange must be like for like and hand to hand. He instructed us to sell gold for silver, silver for gold, wheat for barley, and barley for wheat hand to hand, in whatever quantities we wished. One of the two narrators added, "Whoever gives more or asks for more has engaged in usury."
أخبرنا محمد بن عبد الله بن بزيع قال حدثنا يزيد قال حدثنا سلمة وهو ابن علقمة عن محمد بن سيرين عن مسلم بن يسار وعبد الله بن عتيك قالا جمع المنزل بين عبادة بن الصامت ومعاوية
نهانا رسول الله ﷺ عن بيع الذهب بالذهب والورق بالورق والبر بالبر والشعير بالشعير والتمر بالتمر قال أحدهما والملح بالملح ولم يقله الآخر إلا مثلا بمثل يدا بيد وأمرنا أن نبيع الذهب بالورق والورق بالذهب والبر بالشعير والشعير بالبر يدا بيد كيف شئنا قال أحدهما فمن زاد أو ازداد فقد أربى
Its chain of transmission is sahih. Ibn Majah narrated it in the Book of Trade, Chapter on Currency Exchange and What Is Not Permissible with Excess Hand to Hand, no. 2254, from the hadith of Yazid bin Zuray, with the same wording. It also appears in Kubra, no. 6152. The hadith has other routes of transmission in Muslim and elsewhere.