The Messenger of Allah ﷺ said, "Whoever buys food must not sell it until he has taken full possession of it."Abu Awana said in his version of the hadith that Ibn Abbas added, "I consider everything to be like food in this regard."
حدثنا عمران بن موسى الليثي حدثنا حماد بن زيد ح و حدثنا بشر بن معاذ الضرير حدثنا أبو عوانة وحماد بن زيد قالا حدثنا عمرو بن دينار عن طاوس
قال رسول الله ﷺ من ابتاع طعاما فلا يبعه حتى يستوفيه قال أبو عوانة في حديثه قال ابن عباس وأحسب كل شيء مثل الطعام
Bukhari narrated it in the Book of Sales, Chapter on Selling Food Before Taking Possession of It and Selling What You Do Not Have, hadith 2135, and Muslim narrated it in the Book of Sales, Chapter on the Invalidity of Selling a Sold Item Before Taking Possession of It, hadith 1525, from the hadith of Amr bin Dinar with slightly different wordings.