Sahih al-Bukhari, Volume 3, Book 34, Hadith 334 (USC-MSA)

Narrated Nafi`: Ibn `Umar told us that the people used to buy food from the caravans in the lifetime of the Prophet. The Prophet used to forbid them to sell it at the very place where they had purchased it (but they were to wait) till they carried it to the market where foodstuff was sold. Ibn `Umar said, 'The Prophet also forbade the reselling of foodstuff by somebody who had bought it unless he had received it with exact full measure.'

حَدَّثَنَا إِبْرَاهِيمُ بْنُ الْمُنْذِرِ، حَدَّثَنَا أَبُو ضَمْرَةَ، حَدَّثَنَا مُوسَى، عَنْ نَافِعٍ، حَدَّثَنَا ابْنُ عُمَرَ، أَنَّهُمْ كَانُوا يَشْتَرُونَ الطَّعَامَ مِنَ الرُّكْبَانِ عَلَى عَهْدِ النَّبِيِّ صلى الله عليه وسلم فَيَبْعَثُ عَلَيْهِمْ مَنْ يَمْنَعُهُمْ أَنْ يَبِيعُوهُ حَيْثُ اشْتَرَوْهُ، حَتَّى يَنْقُلُوهُ حَيْثُ يُبَاعُ الطَّعَامُ‏.‏ قَالَ وَحَدَّثَنَا ابْنُ عُمَرَ ـ رضى الله عنهما ـ قَالَ نَهَى النَّبِيُّ صلى الله عليه وسلم أَنْ يُبَاعَ الطَّعَامُ إِذَا اشْتَرَاهُ حَتَّى يَسْتَوْفِيَهُ‏.‏

sunnah.com