Ibn 'Umar (RA) reported that they were beaten during the lifetime of Allah's Messenger (ﷺ) if they had bought foodgrains in bulk and then sold them in the spot without shifting them (to some other place).
Hadith ReferenceSahih Muslim / The Book of Transactions / Hadith: 1527