We used to buy foodgrains during the lifetime of Allah's Messenger (ﷺ). He (the Holy Prophet) would then send to us one who commanded us to take them (the foodgrains) to a place other than the one where we had bought them before we sold it.
Sahih Muslim Book 21, Hadith 41