It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) forbade "the sale of fruit until it changes colour (ripens), the sale of grapes until they turn black, and the sale of grain until it hardens (matures)."
The wording of these narrations is the same.
His (peace and blessings be upon him) words "until it changes colour" are mentioned in Sahih al-Bukhari and Muslim.
And the part from his words "the grapes" to the end was narrated by both Imam Abu Dawud (may Allah have mercy on him) and Imam al-Tirmidhi (may Allah have mercy on him) through al-Hasan bin Ali al-Khallal (may Allah have mercy on him), from Abu al-Walid (may Allah have mercy on him), Affan (may Allah have mercy on him) and Sulayman bin Harb (may Allah have mercy on him); all of them from Hammad (may Allah have mercy on him).
Imam Ibn Majah (may Allah have mercy on him) narrated it in full through Ibn al-Muthanna (may Allah have mercy on him) from Hajjaj (may Allah have mercy on him); all of them from Hammad (may Allah have mercy on him).
Imam al-Tirmidhi (may Allah have mercy on him) said: "This hadith is hasan gharib; we know it only from the narration of Hammad bin Salamah (may Allah have mercy on him)."
And Abu Hatim Ibn Hibban (may Allah have mercy on him) narrated it in his book by way of Hammad bin Salamah (may Allah have mercy on him), through Humayd (may Allah have mercy on him).