It was narrated from Ibn 'Umar that the Messenger of Allah (ﷺ) said:
"Do not sell fruits until they have ripened." And he forbade (both) the seller and the purchaser (to engage in such a transaction). (TH)
English reference (TH): Vol. 3, Book 12, Hadith 2214 (TH)
Arabic reference (TH): Book 12, Hadith 2299 (TH)