The Messenger of Allah ﷺ said, "Whoever buys food should not sell it until he has measured it out."Abu Bakr added, I said to Ibn Abbas, "Why is that?"He replied, "Don't you see that they are exchanging it for gold while the food is still pending delivery?"
حدثنا أبو بكر وعثمان ابنا أبي شيبة قالا حدثنا وكيع عن سفيان عن ابن طاوس عن أبيه
قال رسول الله ﷺ من ابتاع طعاما فلا يبعه حتى يكتاله زاد أبو بكر قال قلت لابن عباس لم قال ألا ترى أنهم يتبايعون بالذهب والطعام مرجى
Muslim narrated it in the Book of Sales, Chapter on the invalidity of selling a purchased item before taking possession of it, hadith no. 31/1525, from Abu Bakr bin Abu Shayba, and it is found in his Musannaf, 6/369. Bukhari also narrated it, hadith no. 2132, through the hadith of Ibn Tawus.